package rocky.freemanagementsystemserver.bean

class CommomResult<T> {
    var data: T? = null;
    var message: String? = null;
    var code: Int = 0;
    var success: Boolean = false;

    fun success(data: T?):CommomResult<T>{
        val result = CommomResult<T>();
        result.data = data;
        result.success = true;
        return result;
    }

    fun fail():CommomResult<Object>{
        val result = CommomResult<Object>();
        result.data = null;
        result.success = false;
        return result;
    }
}